<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class AddFieldQuestionTypeToUserPaperAnswerTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('user_paper_answer', function (Blueprint $table) {
            $table->unsignedTinyInteger('question_type',false)->default(1)->comment('题目类型')->after('question_title');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('user_paper_answer', function (Blueprint $table) {
            $table->dropColumn('question_type');
        });
    }
}
